Legacy Levels Document
By Netbrian
Welcome to my "Legacy of the Wizard" hacking document! At this point, it's mainly about level editing, but it's pretty comprehensive, and you can edit quite a bit with it. Someone offered to do a level editor with an actual programming language, but if you do that, you're going to need to wait for me to catch up after implementing the features listed in here.
Version list:
1.8 More graphics information and some other assorted things put in
1.7 Character editing info added. Yipee.
1.5 Sprite Data vastly expanded, and I added music and store data as well.
1.0 Started this document. YAY!!!
The next things I hope to do are figure out where the music for a level is changed, and start making lists of things, so the person editing doesn't have to try each one.
Note: When editing, be sure to add the ten byte header first... I didn't include it here for my own purposes, but you do need it. And once you've finished the first level, you get to the second level
Beginning of level data capsule 1: $000
End Level Data capsule 1: $300
This data is basically the non-moving section of the level. Although a treasure chest like thing can be inserted, it doesn't do anything. This is how you put in stores... At this point, all data seems to react correctly, but I'm still experimenting. The included image details each byte used here. Also, the things are stored in columns, so the first byte is your upper left hand corner, and it works it's way down to the lower left hand corner before moving to the next column. The palette will be different for other levels (you can even change it), but the items stay the same. There are four different palettes used in each level for the background junk. The first one goes until 3F, the second one to 7F, the third one to BF, and the fourth to FF, repeating the same properties, but different colors. (Note.. I don't quite know if the picture of the princess works yet.. Anyone want to verify this?)
Beginning of level footer capsule 1: $301
Ending of level footer capsule 1: $39F
Beginning of level data capsule 2: $400
This stuff changes different properties of the level,
Beginning of level data capsule 1: $000
End Level Data capsule 1: $300
Beginning of level footer capsule 1: $301
Ending of level footer capsule 1: $39F
Beginning of level data capsule 2: $400
I think you can figure out the pattern from here. The dungeon is four capsules wide I think, so it just wraps around to the next level down on the left.
$301: Enemy Group
Starts at 24... Ends at thirty. Before twenty four, you get sort of gliched enemy sprites, and it can get pretty funny. =). After thirty, it's just these weird sphere like things resembling the ones the bosses shoot at you doing weird stuff. If you wanted to, you could probably do something in the ROM to add more enemy graphics, but it'd have to be before the normal graphics, not after.
$302 - $303: Disguise
These bytes allow the person editing to change which blocks disappear when touched. Byte 2 is what disappears, and byte three is what replaces it. For Byte 2, only use bytes that are from palette one, the other three won't do anything, but Byte 3 will change colour depending on the palette used.
$304
Also affects the treasure chest, in SOME form. How? I don't really know. So far, it doesn't seem like it's horribly necessary for most purposes.
$305
This is a nice, easy byte to work with. That's a major rarity for these graphic pointer bytes. I'm still subtracting the header, remember. Anyways, bytes in pairs do the same thing, so using the value 00 or 01 makes no difference to my knowledge. The same goes for 02 or 03, and so on. This loads graphics used in the first bank, and while I'm not very much of a ROM hacker, it looks like this could be used fairly well for a lot of customizability. (Conventions note: I'll use the second byte in the sets, just to make things easier for me.) 01 starts at the address $20000 (try use you Tile Editor of choice (my preference is TileLayer or TileLayerPro) to see graphics addresses), and loads it all into a bank until $207FF... 03 will load from $20800 to $20FFF, and so on... I'm still working on how this fits in with the numbering in the terrain, but it's a START...
$306
This one works the same as $305, only it loads the data into the bottom bank.
$307
So far I've determined this one affects the treasure chest in some way... To my knowledge, just set this byte to the same thing in the chest, or odd things may happen.
Byte $308,$309: YAY!!! The object coordinates begin! Byte seven is the X coordinate, and it goes one block to the east every time you increase it, and Byte eight goes a little down every time you increase it.
Byte $30A: What's IN the treasure chest. To my knowledge, there is only one treasure chest per board, so this is all your gonna see of it.
Treasure Chest Bytes:
00: Bread
01: Magic
02: Money
03: Poison
04: Keys
05: Ring
06: Cross
07: Scroll
08: Wings
09: Armor
0A: Mattock
0B: Glove
0C: Rod
0D: Power Boots
0E: Jump Shoes
0F: Key stick
10: Power Knuckle
11: Fire Rod
12: Shield
13: Elixir
14: Magic Bottle
15: Crystal
16: Crown
17: Dragonslayer
$30B: The music byte!!!! It's a bit weird, so I'll list which bytes control music for a particular board.
00: Normal Dungeon
01: Xemn's Theme
02: Meyna's Theme
03: Lyll's Theme
04: Pochi's Theme
05: No clue.. Roas' theme possibly, but I haven't beaten the game, so I would not know.
06: Inn Music
07: Shop Music
08: Death Music
09: Intro Music, but a bit cut down, as the themes of the characters are gone.
0A: Dunno, really fast paced high pitched music. Anyone want to identify it for me?
0B: Boss Music
0C: Overworld Theme
0D: Item Selection Music
0E: Got Item music
0F: Dragon's Music, maybe. Haven't heard it before. No clue.
10: Same has 0A...
11: Silence...
If you wish for more exact music names, download the NSF for Dragon Slayer 4 at www.zophar.net. They go in the same order there.
Other bytes play music, but they are more or less the same tunes described above. There MIGHT be differences though, so I'll go through them later.
$310, $311, $312, $313: SHOPS!!! YAY!! The first byte is the first item, and
second is the price of it. The third if the second item, and fourth is price of THAT.
Don't ask me why, but the shop uses different item bytes then the chests do. Basically, subtract eight from them, and you'll get the store bytes.
$315: Music control byte. If you want the music to ALWAYS be the same as defined above, give it the value 00. If you want it to be whatever it last was, use 01 or above.
Byte $30C until...
$31F (of the footer)
I have no idea. Didn't seem to change a thing when I altered them. After I finish my first go around with the footer, I'll come back to these and compare them with other levels. Possibly unused space for special stuff.
$320: The sprites used by a specific enemy. Doesn't change the behavior, but does make it look good or weird.
For best results, use the values 41, 51, 61, or 71. These will reference the normal enemies, provided you set $301 properly. Here's a list of things that won't come up gliched with this, but aren't normal enemies.
01: Another clone of you, with your arm normal.
11: A clone of your character with arm upraised, like you're going to shoot something.
21: The Magic attack of your current character
31: Pretty useless...
41: Standard Enemy
51: Standard Enemy
61: Standard Enemy
71: Standard Enemy
81-D1: Items
E1: Erm... A cloud. An invincible cloud, that you can't touch. Wow.
F1: The shopkeeper and innkeeper. It sometimes turns into a monster egg, and dies sorta gliched.
I don't recommend using something for the second nibble (as in, in BA, A is the second nibble) other than 1. 5, 9, and D don't do anything terrible (heck, I can't tell the difference between them when used. I'm 90% certain these can easily be used interchangeably.) Also, you can see the graphics that were loaded by use of the pattern tables in NESticle.
$321: The palette of an enemy! YAY!! I'm getting closer to finding there enemy data! This is which of the four sprite palettes the enemy uses.
If you use 00 as this, it'll use the current character's palette.
*Interesting... Use 11 as $320, and 00 as $321 to get a clone of your character as the enemy.
$322: X-Coordinate of enemy.
$323: Y-Coordinate of enemy.
$324: The first byte plus one seems to be the HP of the enemy
$325: Damage on contact of enemy.
$326: Death Sprite (Use the same four upper bits as the sprites for best results.)
$327: Another sprite used by a specific enemy.
$328: Behavior of the enemy. (YES! I found it!)
$329: The speed of the enemy.
From what I can tell, a three-byte buffer zone is in between each enemy "capsule", and then the next one begins.
$3E0-$3EF: Background palette!!!! Really helpful, as you can now change the level décor! The offsets $7F0, $7F4, $7F8, and $7FC do not seem to change anything, but they're there anyway. Note, each of these palettes correspond with any palettes mentioned earlier, the first one is 00, second 01, third 02, and fourth 03. Mainly used for stuff in level data
$3F0-$3FF: Sprite palette! The first four don't change anything, and neither do, $804, $808, and $80C. These correspond to almost any palette in the footer, especially for enemies/treasure chests. 00 is character palette (changes depending on current character), and the other three are 01, 02, 03, respectively, in four byte groups.
Graphics: I originally only bothered to work with the graphics to find out where level, character, or other interesting data WASN'T, but, for want of content, I catalogued the graphics. This may be a blessing, as it might help me decipher some of the bytes in level editing.
$20000 - $23FFF: The normal level graphics, for structures and stuff. A lot of things seem to appear twice which may allow graphics hacks to use more space.
$24000 - $24FFF: Mainly graphics for the Dragon, but some misc. other graphics. Don't ask me why they are here. There also seems to be some symbol, anyone want to clue me in?
$25000 - 253FFF: Items and Weapons.
$25400 - $271FF: Mostly fonts (and there seem to be a high number of them), but maybe other stuff too.)
$27200 - $278FF: Titles Screen graphics. It's that simple.
$28400 - $2BFFF: Enemy sprites. They are stored like this:
$Byte 1: Top (My) left
$Byte 2: Bottom Left
$Byte 3: Top Right
$Byte 4: Bottom Right
$2C000 - $2CFFF: Boss graphics, I think.
$2D000 - $2DE00: The graphics of the people inside the house. Unless it's used when you beaten the game, most of these seem pretty unused... And there are even sprites of the grandparents!
Character Data:
With MUCHO thanks to SnowBro, I was able to convert game genie codes into editable data! YAY!!!
Byte 1: Jump
Byte 2: Power
Byte 3: ??? This one is odd... ALSO affects strength, but to a much weirder degree. I'd leave it alone, it seems to glitch things. I do know that it is NOT how you give someone Poichi's immunity to monsters. That's a bummer, as it's the only attribute to this characters I'm unable to edit. =(
Byte 4: Range
Xemn: $1FFBB
Menya: $1FFBD
Roas: $1FFBF
Lyll: $1FFC3
Pochi: $1FFC7
Items:
This details what characters can equip what items. Two bytes per character, and it uses bits. A 0 means it cannot equip it, and a 1 means it can. Read it left to right, top to bottom. So the first byte details the top row, the second the bottom.
Xemn: $1FFCB
Menya: $1FFCD
Roas: $1FFCF
Lyll: $1FFD1
Pochi: $1FFD3
Palettes?!?
I think I've found the character palettes! YAY!!!
For colour references, http://www.zophar.net/trans/docs/paletdat.html. The chart there REALLY helps. Oh, I wouldn't try editing the 0F at the beginning of each one... Affects other things too. But a good thing about this game is not much ELSE is affected.
Xemn: $1FFD5
Menya: $1FFD9
Roas: $1FFDD
Lyll: $1FFE1
Pochi: $1FFE5
Well, hope I proved helpful to you!
By Netbrian. You can contact me at netbrian@aol.com, and ask me questions, bug me about data, etc. If you have something I don't have here, E-Mails are nice. Ask before using on your website, alright?
Legacy of the Wizard and all names used here are trademarks of Broderbund Software Inc. and Falcom Software.